{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "Created by william from lexueoude.com. 更多正版技术视频讲解，微信公众号：乐学FinTech"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1.DDM（Discounted Dividend Model红利折现模型）：\n",
    "$$ P_0 = \\sum_{i=1}^{\\infty} \\frac{D_i}{(1+r)^i}$$ <br>\n",
    "适用条件：<br>\n",
    "1)公司需要分红<br>\n",
    "2）*即使分红，也需要考虑到分红与盈利相符合<br>\n",
    "3)非控制权<br>\n",
    "\n",
    "**对普通股进行分析（1）MI(DDM) (2)Controlling share holder "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2.GGM（Gordon Growth Model）\n",
    "\n",
    "假设：Dividend 以g进行增长\n",
    "因为我们可以从报表中获取$$D_0$$,通过假设某一增长率g，然后将$$D_i=D_0(1+g)^i$$带入原来的DDM模型<br>\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*凡是等比数列求和<br>\n",
    "\n",
    "$$ ①式 :P_0 = \\frac{D_0(1+g)^1}{(1+r)^1} + \\frac{D_0(1+g)^2}{(1+r)^2}+ \\frac{D_0(1+g)^3}{(1+r)^3}...\\frac{D_0(1+g)^n}{(1+r)^n}$$<br>\n",
    "$$ ②式 :P_0 \\frac{(1+g)}{(1+r)} = \\frac{D_0(1+g)^2}{(1+r)^2} + \\frac{D_0(1+g)^3}{(1+r)^3}+ \\frac{D_0(1+g)^4}{(1+r)^4}...\\frac{D_0(1+g)^{n+1}}{(1+r)^{n+1}}$$\n",
    "\n",
    "$$ P_0 = \\frac{D_0(1+g)}{r-g} =  \\frac{D_1}{r-g}$$\n",
    "特殊情况：我们必须要保证r - g >0,但是g<0 d 情况可以存在！"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "eg: LXOD Mines Inc. is expected to pay $5 dividend next year,William the analyst expect its dividend will decline at the rate of 5%(because LXOD's mining properties is depleting)\n",
    "r = 10 % V?\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "text": [
      "33.33333333333333\n"
     ],
     "output_type": "stream"
    }
   ],
   "source": [
    "def calculate_the_value_of_LXOD_mining_Inc(D1,r,g):\n",
    "    V = D1/(r-g)\n",
    "    return print(V)\n",
    "\n",
    "calculate_the_value_of_LXOD_mining_Inc(5,0.1,-0.05)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "**思考问题方式:1\n",
    "$$P_0 = \\frac{D_1}{(r-g)}$$<br>\n",
    "$$g=r - \\frac{D_1}{P_0}$$\n",
    "\n",
    "如果你预测的g是小于你通过上述公式变形推出的隐含增长率g的时候，价格高估，需要卖出"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**思考问题方式:2\n",
    "PVGO：人为将公司的价值拆分为5两个部分：<br>\n",
    "1.维持现状不变的部分（永续年金）<br>\n",
    "$$\\frac{E}{r}$$<br>\n",
    "2.PVGO<br>\n",
    "\n",
    "按照这种估值方式，公司价格应该为：$$\\frac{E}{r}+PVGO$$\n",
    "\n",
    "通过GGM与PVGO的思想结合在一起：\n",
    "$$P=\\frac{D1}{r-g}=\\frac{E}{r}+PVGO$$\n",
    "\n",
    "$$PVGO =\\frac{D1}{r-g} - \\frac{E}{r} $$\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "pycharm": {
     "is_executing": false,
     "name": "#%% md\n"
    }
   },
   "source": [
    "$$ROE = \\frac{NI}{Equity}$$ \n",
    "\n",
    "因为RE = 0，所以Equity不会增加，同时NI不会增加，所以ROE恒定 \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "source": [
    "LXOD is expected to have average EPS of 0.5 ,LXOD\n",
    "distributed all earnings as dividend, r = 10% (required return ) ,Current Price = 50, PVGO?"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "name": "stdout",
     "text": [
      "45.0\n"
     ],
     "output_type": "stream"
    }
   ],
   "source": [
    "def PVGO_method(P,D,r):\n",
    "    PVGO =P - D/r \n",
    "    \n",
    "    return PVGO\n",
    "\n",
    "print(PVGO_method(50,0.5,0.1))\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n",
     "is_executing": false
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}